package com.zhang.mapper;

import com.zhang.entity.ShoppingSysCustomer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhang.vo.CustomerLoginVo;
import com.zhang.vo.RegisterVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ZhangD
 * @since 2021-07-13
 */
@Mapper
public interface ShoppingSysCustomerMapper extends BaseMapper<ShoppingSysCustomer> {

    @Select("select login_name,password from shopping_sys_customer where login_name=#{loginName} and password=#{password}")
    CustomerLoginVo login(CustomerLoginVo customerLoginVo);

    @Select("select login_name,password from shopping_sys_customer where login_name=#{loginName}")
    CustomerLoginVo preRegist(CustomerLoginVo customerLoginVo);

    int regist(RegisterVo registerVo);
}
